<!doctype html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta charset="utf-8">
    <title>学吧详情</title>
    <tc_include file="Public:head" />
    <link rel="stylesheet" href="__TMPL__Public/invest/css/detailedcourse.css">


</head>

<body>
<nav class="navbar navbar-default" role="navigation">
    <tc_include file="Public:nav" />
</nav>

<div class="header">
    <div class="container header-content">
        <div class="col-md-6 col-sm-6 col-xs-6 header-photo">
            <img src="{:sp_get_image_url($smeta['thumb'])}">
        </div>
        <div class="col-md-6 col-sm-6 col-xs-6 header-xin">
            <h2>{$name}</h2>
            <ul class="header-list">
                <li>好评率95%</li>
                <li>购买人数{$buy_coun}</li>
                <li style="border:none">
                    <!-- JiaThis Button BEGIN -->
                    <div class="jiathis_style"><span class="jiathis_txt">分享到：</span>
                        <a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jiathis_separator jtico jtico_jiathis" target="_blank"></a>
                    </div>
                    <script type="text/javascript" >
                        var jiathis_config={
                            summary:"",
                            shortUrl:false,
                            hideMore:false
                        }
                    </script>
                    <script type="text/javascript" src="http://v3.jiathis.com/code/jia.js" charset="utf-8"></script>
                    <!-- JiaThis Button END -->
                </li>
            </ul>
            <div class="clearfix"></div>
            <h3 class="yellow header-xin-h3"><b><span >￥</span>{$shop_price}</b>
                <span class="grey header-x-zi">原价：<e>￥{$market_price}</e></span>
            </h3>
            <p>
                <if condition="$shop_price eq 0">
                    <a href="{:U('Invest/Detailed/videoplay',array('id'=>$id))}">立即观看</a>
                    <else />
                        <if condition="$play eq pass">
                            <a href="{:U('Invest/Detailed/videoplay',array('id'=>$id))}">立即观看</a>
                            <else />
                            <a href="javascript:void(0)" id="purchase">立即购买</a>
                        </if>
                </if>


                <!--<span><i class="glyphicon glyphicon-heart"></i>收藏(<span class="header-nb">8</span>)</span>-->
            </p>
            <p class="header-end-p"><e>交易提醒</e>请通过本页面购买，任何平台外交易均无法得到壹高学堂保障！</p>

        </div>
    </div>

</div>

<div class="warp">
    <div class="container">
        <div class="col-md-8 col-sm-8 col-xs-8 c-left">
            <div class="content">
                <div id="nav-menu">
                    <ul class="nav nav-tabs" id="nav">
                        <li class="active"><a data-toggle="tab" href="#home">课程概述</a></li>
                    </ul>
                </div>
                <div class="tab-content">
                    <div id="home" class="tab-pane fade in active">
                            <div class="row c-box cur">
                                <div class="c-box-yi">
                                    <div class="col-md-2 col-sm-2 col-xs-2 c-title">
                                        <p class="text-center grey">课程简介：</p>
                                    </div>
                                    <div class="col-md-10 col-sm-10 col-xs-10 c-xin">
                                        <p>独特的技巧包括趋势判断（黄金分割等），强势跟庄（操作周期），及盘面不同时期的实战操作
                                            方法。深入了解主力的坐庄手法，轻而易举的抓住主力的动向。</p>
                                    </div>
                                </div>
                                <div class="clearfix"></div>
                                <div class="c-box-er">
                                    <div class="col-md-2 col-sm-2 col-xs-2 c-title-er">
                                        <p class="text-center grey">适用人群：</p>
                                    </div>
                                    <div class="col-md-10 col-sm-10 col-xs-10 c-xin-er">
                                        <p>普通散户炒股者<br>对证券金融股市投资有一定基础认识<br>循序渐进，系统性学习，以学习方法为原则,适合于中线及波段操作心态投资者</p>
                                    </div>
                                </div>

                                <div class="clearfix"></div>
                                <div class="c-box-er c-box-san">
                                    {$post_content}
                                </div>
                            </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-md-3 col-sm-3 col-xs-3 right-box">
            <ul class="right-li">
                <li class="r-li-img"><img src="{:sp_get_image_url($avatar)}"></li>
                <li class="r-padding grey">{$uname}</li>
                <li class="r-padding">学生数<br><span class="grey">{$number}</span></li>
            </ul>
            <div class="clearfix"></div>
            <p>{$signature}</p>
        </div>
    </div>
</div>
<!--第七块footer-->
<div class="clearfix"></div>
<div class="footer">
    <tc_include file="Public:footer" />
</div>


</body>
</html>
<tc_include file="Public:scripts" />
<script type="text/javascript" src="__TMPL__Public/invest/js/jquery-browser.js"></script>
<script>
    Wind.use('validate','artDialog', function () {

        $('#purchase').click(function (event) {
            var id = {$id};
            $.ajax({
                type: "post",
                url: "{:U('Payment/Index/ceorder')}",
                data: {id:id, goods_type: 1},
                dataType: "json",
                success: function (data) {
                    if (data.status) {
                        var order_sn=data.order_sn;//你需要传的值
                        var orderid= parseFloat(order_sn);
                        var url = "{:U('Payment/Index/index',array('snid'=>orderid))}";
                        var urls = url.replace("orderid",orderid);//最后生成URL
                        window.location.href=urls;
                    } else {
                        art.dialog({
                            content: data.info,
                            icon: 'error',
                            ok: function () {
                                window.location.reload();
                                return true;
                            }
                        });
                    }
                },
                error: function (data) {
                    art.dialog({
                        content: "购买失败！",
                        icon: 'error',
                        ok: function () {
                            window.location.reload();
                            return true;
                        }
                    });
                }
            });
        })
    })
</script>

